<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			*{
				margin: 0px;
				padding: 0px;
			}
			html{
				height: 100%;
			}
			body{
				height: 70%;
				border: 1px solid;
				margin: 30px auto;
			}
			.test{
				width: 200px;
				height: 200px;
				background-color: pink;
				border: 1px solid deeppink;
				text-align: center;
				
				position: absolute;
				top: 0px;
				right: 0px;
				bottom: 0px;
				left: 0px;
				margin: auto;
				
				transition-property: width;
				transition-duration: 1s;
				transition-timing-function: linear;
			}
		</style>
	</head>
	<body>
	</body>
	<script type="text/javascript">
		window.onload = function () {
			var test = document.createElement("div");
			test.class = "test";
			document.documentElement.appendChild(test);
			setTimeout(function () {
				test.style.width = "300px";
			}, 2000);
		};
	</script>
</html>
